﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WSS.hameduconn.Business.Dto;

namespace WSS.hameduconn.Business.Api
{
    public class LoginApi
    {
        private static WSShameduconnDBEntities contextDB = new WSShameduconnDBEntities();
        public static void Updated(LoginsDto login)
        {
            try
            {
                Login objRegistration = contextDB.Logins.First(att => att.Id == login.Id);
                objRegistration.Username = login.Userename;
                objRegistration.Password = login.Password;
                objRegistration.FirstName = login.FirstName;
                objRegistration.LastName = login.LastName;
                objRegistration.JobTitle = login.JobTitle;
                contextDB.SaveChanges();
            }
            catch (Exception ex) { throw; }
        }
    }
}
